﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace Philippine_National_Red_Cross
{
    public partial class Form1 : Form
    {
        byte[] img;
        public Form1(byte[] img, int curIndex)
        {
            this.img = img;
           InitializeComponent();
           this.Load += new EventHandler(Form1_Load);
        }

        void Form1_Load(object sender, EventArgs e)
        {
            Image newimg;
            using (MemoryStream ms = new MemoryStream(img, 0, img.Length))
            {
                ms.Write(img, 0, img.Length);
                newimg = Image.FromStream(ms, true);
                pictureBox1.Image = newimg;
            }
        }
    }
}
